svd Interface

public interface svd

Module Procedures

private pure subroutine svd_dbl(a, s, u, vt)

Computes the singular value decomposition of an M-by-N matrix such that where is an M-by-M orthogonal matrix, is an M-by-N diagonal matrix containing the singular values, and is an N-by-N orthogonal matrix.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:,:) :: a

The M-by-N matrix to factor.

real(kind=real64), intent(out), optional, allocatable, target, dimension(:) :: s

A MIN(M, N)-element array containing the singular values of a sorted in descending order.

real(kind=real64), intent(out), optional, allocatable, dimension(:,:) :: u

An optional argument, that if supplied, is used to contain the orthogonal matrix from the decomposition. The matrix contains the left singular vectors.

real(kind=real64), intent(out), optional, allocatable, dimension(:,:) :: vt

An optional argument, that if supplied, is used to contain the transpose of the N-by-N orthogonal matrix . The matrix contains the right singular vectors.

private pure subroutine svd_cmplx(a, s, u, vt)

Computes the singular value decomposition of an M-by-N matrix such that where is an M-by-M orthogonal matrix, is an M-by-N diagonal matrix containing the singular values, and is an N-by-N orthogonal matrix.

Arguments

Type IntentOptional Attributes Name
complex(kind=real64), intent(in), dimension(:,:) :: a

The M-by-N matrix to factor.

real(kind=real64), intent(out), optional, allocatable, target, dimension(:) :: s

A MIN(M, N)-element array containing the singular values of a sorted in descending order.

complex(kind=real64), intent(out), optional, allocatable, dimension(:,:) :: u

An optional argument, that if supplied, is used to contain the orthogonal matrix from the decomposition. The matrix contains the left singular vectors.

complex(kind=real64), intent(out), optional, allocatable, dimension(:,:) :: vt

An optional argument, that if supplied, is used to contain the conjugate transpose of the N-by-N orthogonal matrix . The matrix contains the right singular vectors.